import Api from './request'

import { LoginData, RegisterData } from './types/user'


// 用户登陆接口
export const loginApi = <T>(data: LoginData) => Api.post<T>('/auth/login', data)

// 用户注册接口
export const registerApi = <T>(data: RegisterData) => Api.post<T>('/auth/register', data)

// 查询自己用户信息
export const getUserInfoApi = <T>() => Api.get<T>('/user')